Repository navigation
A hand-off to a person is typed, and CoderHelm owns its own limits - #930
Merged
Merged
Conversation
A hand-off is a PersonOnly from a closed set (a named permission an owner or admin grants, a product decision, an approval the rules require, a credential, work someone else holds, a real-world action), built only through common::person_only. Words about CoderHelm's sandbox, allowlist, budgets, tools, CI use, labels, tests or reads make an OwnProblem instead: an internal alert and one run-page line. The person gate, hand-backs and a fix round's NEEDS A PERSON line all go through it. On its own pull request the reviewer blocks only on what a route can satisfy (review_feasible). A pull request with no progress for a day is diagnosed, retried along its next route and alerted (own_problems::check on the sweep). Hand-offs are counted per team by reason, own problems by subject, with the time each pull request spent blocked. Incident case xd_own_limits_never_a_persons.
| } | ||
|
|
||
| /// The count attribute for an own problem's subject. | ||
| pub fn own_attr(s: OwnSubject) -> String { |
Contributor
There was a problem hiding this comment.
💬 FYI: Near-identical helpers added together (scope, not verified)
services/worker/src/passes/own_problems.rs adds own_attr next to person_attr, added in the same change. Keep one helper with the shared logic (a parameter for what differs) and call it from both places. If the ticket truly needs it, say why on a line Wider than the ticket: services/worker/src/passes/own_problems.rs: <why>.
FYI, not a block: on the whole picture this is not a named correctness, security or data-loss problem to hold the merge on.
coderhelm
Bot
dismissed
their stale review
December 1, 2026 03:18
Superseded by CoderHelm's latest review
Contributor
|
🟡 Post-merge health check: deploy cancelled: the deploy for
|
nambok
added a commit
that referenced
this pull request
Dec 1, 2026
…ror reads as one a person must repair (#937) * A hand-off to a person is typed, and CoderHelm owns its own limits A hand-off is a PersonOnly from a closed set (a named permission an owner or admin grants, a product decision, an approval the rules require, a credential, work someone else holds, a real-world action), built only through common::person_only. Words about CoderHelm's sandbox, allowlist, budgets, tools, CI use, labels, tests or reads make an OwnProblem instead: an internal alert and one run-page line. The person gate, hand-backs and a fix round's NEEDS A PERSON line all go through it. On its own pull request the reviewer blocks only on what a route can satisfy (review_feasible). A pull request with no progress for a day is diagnosed, retried along its next route and alerted (own_problems::check on the sweep). Hand-offs are counted per team by reason, own problems by subject, with the time each pull request spent blocked. Incident case xd_own_limits_never_a_persons. * Waiting runs go on by themselves, and texts say what actually happens A run waiting on a person resumes when what it waits for arrives: a comment or reply on its ticket (Jira, or a plain comment on the GitHub issue), access granted on GitHub or a repository turned on, or usage limits saved that allow runs. Wait actions name the one thing to do and where, never "then press Retry". The wrong-repo note names the `Repo:` line and cuts its reason at a word. Tests-and-scope notes no longer quote the coding model's instructions. Fix rounds get update_pr_description with the feedback round's guard. PR labels are CoderHelm's to add, and an unblock never ends in "or run the command yourself". The updater waits out a busy stack and retries a rollback caused by throttling by itself; a failed update stack in another account gets one AWS admin action. person_text guards each of these texts. * Usage-limit, reopened-change, approval and alert waits go on by themselves Runs waiting on the usage limit start again from the 15-minute sweep once the team's limit allows runs, so a new month resets them. A run whose change closed goes back to waiting when the change is reopened, and goes on when it merges. An answered approval resumes the same run with the work it kept. An alert run resumes when its alert fires again and closes when it clears; its wait says what to do first, then Retry on the run page. * A woken run that couldn't be queued waits again, and only a closed change's stop is read as one - A wake (gateway event or the worker's limit sweep) that marked the waiting run superseded but couldn't queue its new run puts it back to waiting, with the status key and ending it had, only while it still holds that wake's write (common::run_wake::put_back). The ticket is serialized before the write, so only the send can fail after it. - A woken security fix run starts as Retry starts it: a new request for its unit's findings (security::retry_event), not its ticket again. - The change-wait sweep reads a run as "its change closed" only when its wait is that stop (change_wait::waits_on_close). A run keeps the change it waited on after it went on, so a later question, approval or person's stop is never overridden. - A comment no longer restarts a run a person stopped or put back to draft (HumanOnly::PersonAction); only that person's Retry or ready does. - A label item that names production, a release or a publish in any word (deploy-prod, release, CI:DEPLOY_PRODUCTION) stays the team's call. - An update stack still rolling back (_IN_PROGRESS) is told to wait, never to update again or delete. - one_way finds its cut in an ASCII-lowercased copy, so the offset is always a char boundary of the text it cuts. * A run the token limit refuses pauses and goes on by itself, and no error reads as one a person must repair A model call refused by the team's monthly token limit ("limit reached") was read as an error nobody knew, so the run stopped as "an error it doesn't know how to repair ... put it right, then press Retry" and waited on a person past the month's turn. - The refusal is a typed pause (common::token_room, Kind::TokenLimit): the run keeps its continuation and resumes in place, from the step that was refused, when the month turns or the limit is raised. #924's wake_limit_waits hands these waits to token_room::wake_team. - New runs wait for token room when what is left is less than a run of their kind takes; a run under way waits before building; runs in progress come first on what is left. - Warnings at 80% and 95%, once each a month, with the day the limit runs out at this pace; /api/usage gives warn_level and projected_at. - A schedule at 00:00 and 00:01 UTC on the 1st sends the sweep; a saved limit sends it at once; a paused run gets no reminder. - A teammate's branch is left as it is: the run works on <branch>-N and says so once. - An error nobody classified is CoderHelm's own problem: retried with longer waits, then parked with an internal alert (#930's own_problems); the generic frame is gone and person_text refuses it. - Runs an older release stopped this way are found by their stored words and resumed after the deploy. - Incident case xg_token_limit_pauses_and_resumes. * A paused run reads as paused in the runs list and the palette, and sends run.paused - RunSummary gains pause (the list reads waiting_on), and the search the command palette uses carries it too, so a run paused on the token limit is never listed as waiting for an answer. - A pause sends the new webhook event run.paused, with its line in error; run.needs_input stays for waits a person ends. Both are in the catalog, so the OpenAPI document lists them. - The event scrubber no longer redacts the plain word after "token" ("token limit"); a credential after it still is. --------- Co-authored-by: coderhelm[bot] <272032808+coderhelm[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When CoderHelm hit a limit of its own, it handed the job to a person or let the pull request sit. That covered its sandbox, its network allowlist, its time budget, its tools, its use of CI, and a proof its own review asked for that none of its routes could run. This change makes every hand-off typed so a CoderHelm-owned limit can't become a person's step. It also stops CoderHelm's reviewer from blocking its own pull request on something no route can satisfy, adds a stall detector, and counts hand-offs so a rise shows.
This is the second of two pull requests. #927 covers derived egress and proof routes: the sandbox's network allowlist, taken from the default branch's config and deploy outputs, and the proof plan's routes (the sandbox against the preview, then staging, then an app started in the sandbox, then CI repeats).
Changes
common::person_only).PersonOnlyis a closed set: a named permission an owner or admin grants, a product decision, an approval the repository's or team's rules require, a credential only the person holds, work someone else holds, or a real-world action (a purchase with real money, a real device). Its text (Named) is private to the module, so a hand-off can't be built from loose words; acompile_faildoctest shows this. No variant covers CoderHelm's sandbox, allowlist, budgets, tools, CI use, labels, tests or reads.parse,of_reason,of_human_only) returnsResult<PersonOnly, OwnProblem>.human_item). A CoderHelm-owned item becomesWork::Problem, neverOutcome::Human;HandBack::new,human_only_in);NEEDS A PERSONline (own_review_ledger::observe).own_problems). Each one becomes an internal alert for CoderHelm's maintainers (an error log line carryingCODERHELM_OWN_PROBLEM, and a row kept for 30 days) plus one plain line on the run page. The work then goes on by another route.review_feasible). On CoderHelm's own pull request, a blocking finding stands only if a route can satisfy it: an edit, a sandbox run, CI, or a page check. What only a person has becomes one typed question; anything else is CoderHelm's note plus an internal alert. It is one call in the reviewer, after the existing rules.own_problems::check, one line in the 15-minute sweep). A pull request with no progress for 24 hours gets:It acts at most once a day per pull request, claimed on the run.
HANDOFF_STATSitem counts hand-offs by reason (person_<reason>), CoderHelm's own problems by subject (own_<subject>), stalls, andpr_blocked_secs. Each run also keepsblocked_secs.xd_own_limits_never_a_persons: invented acme bookstore replays.Verification
human_only_inandHandBack::new;person_only, or if aHumanItemis built outside its one constructor.cargo fmt --all --check,rustfmt --check --edition 2021 worker/src/passes/incidents/*.rs,cargo clippy -p common -p worker -p gateway --all-targets -- -D warningsandcargo test -p common -p worker -p gatewaypass. The brand spelling and example domain checks pass too.